<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <form name="form1">
        <h2>form1</h2>
        <p>
            hobbys
            <input type="checkbox" name="hobbys" value="css"> CSS
            <input type="checkbox" name="hobbys" value="html"> HTML
            <input type="checkbox" name="hobbys" value="js"> JS
            <input type="checkbox" name="hobbys" value="vue"> VUE
        </p>

    </form>
    <script>

        [...document.form1.hobbys].forEach(el => el.checked = ['css', 'js', 'vue'].includes(el.value));


    </script>
</body>

</html>